package com.cookie.loader;

import com.cookie.config.CanalClientConfig;
import com.cookie.config.MysqlConfig;
import com.cookie.config.RedisConfig;
import com.cookie.utils.CanalUtil;

public class CanalWorker {
    private CanalClientConfig canalConf;
    private RedisConfig redisConf;
    private MysqlConfig mysqlConf;

    public CanalWorker(CanalClientConfig canalConf, RedisConfig redisConf, MysqlConfig mysqlConf){
        this.canalConf = canalConf;
        this.redisConf = redisConf;
        this.mysqlConf = mysqlConf;
    }

    public void start(){
        // System.out.println(canalConf);
        // System.out.println(redisConf);
        // System.out.println(mysqlConf);

        CanalUtil util = new CanalUtil(canalConf,redisConf);
        util.start();
    }
}
